package com.uroad.liaoningpos.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.uroad.liaoningpos.activity.LoginActivity;

/**
 * @创建者 wlw
 * @创建时间 2019/4/3 14:48
 * @描述 开机启动广播
 */
public class BootUpReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(final Context arg0, Intent arg1) {
		openApp(arg0);
	}

	private void openApp(Context mContext) {
		Intent intent = new Intent(mContext, LoginActivity.class);
		intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		mContext.startActivity(intent);
	}

}
